// camera_list.cpp

#include <iostream>
#include <opencv2/videoio.hpp>

int main() {
    cv::VideoCapture camera;
    int index = 0;
    while (true) {
        camera.open(index);
        if (!camera.isOpened()) {
            break;
        }
        std::cout << "Camera " << index << ": Opened" << std::endl;
        camera.release();
        index++;
    }
    return 0;
}
